package com.falcon.web.controller;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** 日志接口
 * @author zongf
 * @date 2024-11-14
 **/
@Slf4j
@RestController
@RequestMapping("/auth")
public class MockController {

    @GetMapping("/codes")
    public JSONObject codes(){
        String json = "{" +
                "  \"code\": 0," +
                "  \"data\": [" +
                "    \"AC_100100\"," +
                "    \"AC_100110\"," +
                "    \"AC_100120\"," +
                "    \"AC_100010\"" +
                "  ]," +
                "  \"error\": null," +
                "  \"message\": \"ok\"" +
                "}";
        return JSONObject.parseObject(json);
    }

    @GetMapping("/user/info")
    public JSONObject info(){
        String json = "{" +
                "  \"code\": 0," +
                "  \"data\": {" +
                "    \"id\": 0," +
                "    \"realName\": \"Vben\"," +
                "    \"roles\": [" +
                "      \"super\"" +
                "    ]," +
                "    \"username\": \"vben\"" +
                "  }," +
                "  \"error\": null," +
                "  \"message\": \"ok\"" +
                "}";
        return JSONObject.parseObject(json);

    }

}
